<script setup lang="ts">
import { ref, Ref } from 'vue';
import { useRouter } from 'vue-router';

const router = useRouter()

const username = ref('')
const password = ref('')

function onSubmit() {
  // this.$router.push()
  router.push('/login')
}
</script>
<template>
  <div class="box">

    <van-nav-bar class="header" title="注册3" left-text="返回" left-arrow @click-left="$router.back()" />

    <div class="content">
      <van-form @submit="onSubmit">
        <van-cell-group inset>
          <van-field v-model="username" label="密码" placeholder="请输入密码"> </van-field>
          <van-field v-model="username" label="确认密码" placeholder="请再次输入密码"> </van-field>
        </van-cell-group>
        <div style="margin: 16px;">
          <van-button round block type="danger" native-type="submit">
            提交
          </van-button>
        </div>

      </van-form>
    </div>
  </div>
</template>
<style scoped lang="scss">
.header {
  margin-bottom: 30px;
  background-color: #f1f8e9;
}
</style>
